package com.joysuch.wwyt.workflow.enums;

/**
 * 流程引擎-模板数据源
 *
 * @Author ZhangDong
 * @Date 2020/11/4 13:54
 */
public enum ModelDataSourceTypes {

    USER(0, "人员"), CONTRACTOR_STAFF(1, "承包商人员");

    private Integer index;
    private String type;

    ModelDataSourceTypes(Integer index, String type) {
        this.index = index;
        this.type = type;
    }

    public Integer getIndex() {
        return index;
    }

    public String getType() {
        return type;
    }

    public static String getType(Integer index) {
        ModelDataSourceTypes[] values = ModelDataSourceTypes.values();
        for (ModelDataSourceTypes value : values) {
            if (value.index.equals(index)) {
                return value.type;
            }
        }
        return null;
    }

}
